﻿/**
 * ColorMunch 1.0: AS3 library for the Adobe Kuler API (http://code.google.com/p/colormunch/)
 *
 * ColorMunch is (c) 20009 Ben Kanizay
 * This software is released under the MIT License (http://www.opensource.org/licenses/mit-license.php)
 *
 */

/**
 * @author Ben Kanizay (http://beekay.biz)
 */

package beekay.colormunch {

	import flash.events.Event;

	/**
	 * An event that holds information about the status of a <code>ColorMunch</code>
	 * 
	 */
	public class ColorMunchEvent extends Event {

		/**
		* Busy event
		*/
		public static const BUSY:String = "busy";
		/**
		* Error event
		*/
		public static const ERROR:String = "error";
		/**
		* Load error event
		*/
		public static const LOAD_ERROR:String = "loadError";
		/**
		* Empty result event
		*/
		public static const RESULT_EMPTY:String = "resultEmpty";
		/**
		* Result ready event
		*/
		public static const RESULT_READY:String = "resultReady";

		/**
		* Stores the event data
		*/
		private var eventData:Object;


		/**
		 * Creates a new ColorMunchEvent
         * @param type Type of the event.
         * @constructor
         * 
		 */
		public function ColorMunchEvent(type:String, data:Object = null, bubbles:Boolean = false, cancelable:Boolean = false) {
			super(type, bubbles, cancelable);
			this.eventData = data;
		}

		/**
		* Get the event data
		*/
		public function get data():Object {
			return eventData;
		}
		
	}
}
